﻿using System;
using System.Data;

namespace MySqlQueryToolkit.DataAccess
{
    public interface IDataAccess
    {
        bool CheckConnection();
        string CommandText { set; get; }
        void AddParameter<T>(string name, T value) where T : struct;
        IDataParameterCollection Parameters { get; }
        long ExecuteTimedQuery();
        int ExecuteNonQuery();
        void ExecuteReader(Action<IDataReader> dataMapperAction);
        void ExecuteReader(Action<IDataReader> dataMapperAction, CommandBehavior behavior);
    }
}
